home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / veum / lim.asm next >
Assembly Source File  |  1987-01-19  |  2KB  |  87 lines

  1.         TITLE        LIM--Lotus Intel Microsoft routines
  2.  
  3.     if1
  4.         include    prolog.mac
  5.         endif
  6.  
  7. pgroup        group        prog
  8. dgroup        group        data
  9.         assume        cs:pgroup, ds:dgroup, es:dgroup
  10.  
  11. prog        segment        byte public 'PROG'
  12.  
  13.         public        emmchk
  14. ;
  15. ;    int emmchk()
  16. ;
  17. ;    return nonzero if emm system is present.
  18. ;
  19. emmchk        proc        near
  20.         prolog
  21.         xor        ax,ax        ; return(0) if no emm there
  22.         call        emm_chk
  23.         jnc        ret1        ; there - return(1) 
  24.  
  25. emcr:        epilog
  26.         ret
  27.  
  28. ret1:        mov        ax,1
  29.         jmp        emcr
  30. emmchk        endp
  31.  
  32. ;
  33. ;  Taken from Page 5-4 of the Enhanced Memory Specification manual, AST
  34. ;
  35. ;  GET INTERUPT VECTOR TECHNIQUE
  36. ;
  37. ;  Function:   Used to determine if the EMM is present in the system.
  38. ;           Carry flag is set upon return if no EMM system present.
  39. ;
  40. ;  No registers destroyed;
  41. ;
  42. emm_chk        proc           near
  43.  
  44.                push        ax
  45.                push        es
  46.                push        ds
  47.  
  48.                push        cs
  49.                pop        ds
  50.  
  51.                mov        ax,3567h      ; "DOS: Get Vector, 67H please"
  52.                int        21h
  53.                mov        di,device_name
  54.                       lea        si,emm_signature
  55.                       mov        cx,8
  56.                       cld
  57.                repe        cmpsb
  58.                       jne           emm_err2
  59.                       clc
  60.  
  61. retcfe:               pop        ds
  62.                       pop        es
  63.                       pop        ax
  64.                       ret
  65.  
  66. emm_err2:          stc
  67.                       jmp        retcfe
  68.  
  69. device_header        struc
  70. next_device_ptr        dd    0
  71. attribute        dw     0
  72. strategy_ptr        dw    0
  73. interrupt_ptr        dw    0
  74. device_name           db    0
  75. device_header          ends
  76.  
  77. emm_signature:     db    'EMMXXXX0'
  78.  
  79. emm_chk               endp
  80.  
  81. prog               ends    
  82.  
  83. data        segment        word public 'DATA'
  84. data        ends
  85.  
  86.                end
  87.